﻿@using System.Collections
@using ALinq.BBS
@using ALinq.BBS.App_GlobalResources
@{
    var roles = Roles.GetRolesForUser();
    
    //TODO:判断是否为管理组
    var isAdministrator = true;
    
    
}
<!DOCTYPE html>
<html>
<head>
    <title>@PageData["Title"]</title>
    <link href="@Url.Content("~/Content/Css/Common.css")" rel="Stylesheet" />
    @if (PageData["Css"] != null)
    {
        <link href="@Url.Content("~/Content/Css/" + @PageData["Css"])" rel="Stylesheet" />
    }
    @if (PageData["Styles"] != null)
    {
        foreach (var css in PageData["Styles"])
        {
        <link href="@css" rel="Stylesheet" />
        }
    }
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    @if (PageData["Scripts"] != null)
    {
        foreach (var script in PageData["Scripts"])
        {
        <script src="@script" type="text/javascript"></script>
        }
    }
</head>
<body>
    <center style="margin-top: 16px">
        <div id="header">
            <div id="developer">
                @Label.BannerText
            </div>
            <div id="logo">
                <img alt="Logo" src="@Url.Content("~/Content/Images/Logo.gif")" />
            </div>
            <div id="naviBar">
                @if (User.Identity.IsAuthenticated)
                {
                    <div id="userName">
                        @User.Identity.Name
                    </div>
                }
                <div class="left">
                    <div class="right">
                        @Html.ActionLink(@Label.Home, "Index", "Home")
                    </div>
                </div>
                <div class="left">
                    <div class="right">
                        @Html.ActionLink(@Label.Register, "Register", "Home")
                    </div>
                </div>
                <div class="left">
                    <div class="right">
                        @if (User.Identity.IsAuthenticated)
                        {
                            @Html.ActionLink(Label.Logout, "Logout", "Home");
                        }
                        else
                        {
                            <a href="@Url.RouteUrl(RouteNames.Home, new { action = "Login" })">@Label.Login</a>
                        }
                    </div>
                </div>
                @if (isAdministrator)
                {
                    <div class="left">
                        <div class="right">
                            @this.CreateDashboardPageLink()
                        </div>
                    </div>
                }
            </div>
        </div>
        <div class="HackBox">
        </div>
        @RenderBody()
        <div id="footer" style="font-size: 12px;">
            <div style="text-align: center; margin-bottom: 10px;">
            </div>
            <div style="margin-top: 8px;">
                @*<asp:Substitution ID="Substitution1" runat="server" MethodName="GetHtml" />*@
            </div>
            <div style="margin-top: 8px;">
                Admin Email: <b>ansiboy@163.com</b>&nbsp;<script type="text/javascript" src="http://js.tongji.linezing.com/2618631/tongji.js"></script><noscript><a
                    href="http://www.linezing.com"><img src="http://img.tongji.linezing.com/2618631/tongji.gif" /></a></noscript>
            </div>
        </div>
    </center>
</body>
</html>
